<template>
    <div class="box">
      <van-divider
      :style="{ color: 'red', borderColor: 'red', padding: '0 16px', fontSize:'30px'}"
     >
    相关产品
</van-divider>
      <ul>
        <li v-for="item in goodsList" :key="item.id">
            <img :src="item.list_pic_url" alt="">
            <h6>{{item.name}}</h6>
            <p>{{item.retail_price}}</p>
        </li>
      </ul>
    </div>
</template>

<script>
export default {
    name: "XiangGuanGoods",
    data() {
        return {

        };
    },
  
    props:['goodsList'],
      mounted(){
    setTimeout(()=>{
     console.log(this.goodsList);
    },300)
    },
};
</script>

<style scoped lang='less'>
.box{
    ul{
        display: flex;
        flex-wrap: wrap;
        text-align: center;
        li{
            font-size:16px;
            width:50%;
            img{
                width:100%;
            }
           
            p{
                color:red;
            }
        }
    }
}
</style>